package com.seeyon.cap4.form.bean.fieldCtrl;

import com.seeyon.cap4.form.bean.button.CommonBtn;
import com.seeyon.cap4.form.util.Enums;
import com.seeyon.ctp.common.i18n.ResourceUtil;

import java.util.Date;

/**
 * @title ExportExcelCtrl
 * @description: 导出领导数据自定义按钮
 * @author wxt.daicheng
 * @date 2024/8/20
 * @version 1.0
 */
public class ExportExcelCtrl extends CommonBtn {
    @Override
    public String getKey() {
        return "16868820839233345";
    }

    @Override
    public String getNameSpace() {
        return "button_" + this.getKey();
    }

    @Override
    public String getText() {
        return ResourceUtil.getString("导出领导数据");
    }

    @Override
    public String getPCInjectionInfo() {
        return "{\"path\":\"apps_res/cap/customCtrlResources/exportExcelCtrl/\",\"jsUri\":\"js/runtime.js?v="+ new Date().getTime() +"\",\"initMethod\":\"init\",\"nameSpace\":\""+getNameSpace()+"\"}";
    }

    @Override
    public String getMBInjectionInfo() {
        return null;
    }

    @Override
    public void init() {
        this.setPluginId("exportExcelCtrl");
        this.setIcon("cap-icon-custom-button");
    }
    @Override
    public boolean canUse(Enums.FormType formType) {
        return true;
    }
}
